//
//  BaseButton.swift
//  EasyDana
//
//  Created by mac on 2024/10/23.
//

import UIKit

class BaseButton: UIButton {

    @IBInspectable
    var imageName: String {
        set {
            if HTTPManager.default.config?.gallant == 2 {
                if !newValue.hasSuffix("_id") {
                    let image = UIImage(named: newValue + "_id")
                    if image != nil {
                        self.setImage(image, for: .normal)
                    }
                }
            } else {
                if !newValue.hasSuffix("_id") {
                    self.setImage(UIImage(named: newValue), for: .normal)
                }
            }
        }
        get {
            return ""
        }
    }

}
